//---------------------------------------------------------------------------
#ifndef DropEditH
#define DropEditH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <StdCtrls.hpp>
//---------------------------------------------------------------------------
typedef void __fastcall (__closure *TEditDropFiles)(TObject *Sender, char *DropFileName);
class PACKAGE TDropEdit : public TEdit
{
private:
    void __fastcall WMDropFiles(TWMDropFiles Msg);
    TEditDropFiles FOnDropFiles;
    bool mfAccept;
    bool __fastcall GetDropAccept(void);
    void __fastcall SetDropAccept(bool fAccept);
protected:
public:
        __fastcall TDropEdit(TComponent* Owner);
__published:
    // プロパティの宣言
    __property bool DropAccept = {read=GetDropAccept,
                                      write=SetDropAccept,
                                      default=false};
    // イベントハンドラの宣言
    __property 	TEditDropFiles OnDropFiles={read=FOnDropFiles, write=FOnDropFiles};

BEGIN_MESSAGE_MAP
    MESSAGE_HANDLER(WM_DROPFILES,TWMDropFiles,WMDropFiles)
END_MESSAGE_MAP(TEdit)
};
//---------------------------------------------------------------------------
#endif
